package dao;

public class SingleColumnSort extends Sort {

	private String columnName;

	private int sens;

	public SingleColumnSort(String columnName, int sens) {
		this.columnName = columnName;
		this.sens = sens;
	}

	public String getSortQuery() {
		return " ORDER BY " + columnName + " "
				+ (sens == Sort.ASC_SORT ? "ASC" : "DESC");
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public int getSens() {
		return sens;
	}

	public void setSens(int sens) {
		this.sens = sens;
	}
}
